import React from "react";
import lazyLoad from "@/routers/utils/lazyLoad";
import { LayoutIndex } from "@/routers/constant";
import { RouteObject } from "@/routers/interface";

// menu 模块
const menuRouter: Array<RouteObject> = [
	{
		element: <LayoutIndex />,
		path: "/automatic",
		permissions: [
			"automaticSaleTask",
			"automaticSaleDetail",
			"automaticAccount",
			"transportView",
			"movingAssistantView",
			"exportRecord",
			"verifyTaskList",
		],
		meta: {
			title: "自动化管理",
			icon: "ShoppingOutlined",
			sort: 6,
		},
		children: [
			{
				path: "/automatic/menu1",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu1/index"))),
				meta: {
					requiresAuth: true,
					icon: "ShoppingOutlined",
					title: "上架商铺管理",
					key: "automaticAccount"
				}
			},
			{
				path: "/automatic/menu2",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu21/index"))),
				meta: {
					requiresAuth: true,
					icon: "ShoppingOutlined",
					title: "模拟上架",
					key: "automaticSaleDetail"
				}
			},
			{
				path: "/automatic/menu2/menu22/menu221",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu22/menu221/index"))),
				meta: {
					requiresAuth: true,
					icon: "ShoppingOutlined",
					title: "搬运管理",
					key: "transportView"
				},
			},
			{
				path: "/automatic/menu2/menu22/menu222",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu22/menu222/index"))),
				meta: {
					requiresAuth: true,
					icon: "UserOutlined",
					title: "内部验号",
					key: "movingAssistantView"
				}
			},
			{
				path: "/automatic/menu2/menu23",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu23/index"))),
				meta: {
					requiresAuth: true,
					icon: "UserOutlined",
					title: "验证日记",
					key: "验号日志"
				}
			},
		]
	}
];

export default menuRouter;
